package org.ssm.service.impl;

import org.springframework.stereotype.Service;
import org.ssm.dao.BookMapper;
import org.smm.pojo.BookEntry;
import org.ssm.service.BookService;

import javax.annotation.Resource;
import java.util.List;

@Service("bookService")
public class BookServiceImpl implements BookService {

    @Resource
    BookMapper bookMapper;

    @Override
    public int save(BookEntry bookEntry) {
        return bookMapper.save(bookEntry);
    }

    @Override
    public int delete(int id) {
        return bookMapper.delete(id);
    }


    @Override
    public int update(BookEntry bookEntry) {
        return bookMapper.update(bookEntry);
    }

    @Override
    public BookEntry getOneBook(int id) {
        return bookMapper.getOneBook(id);
    }

    @Override
    public int getRecordCount(BookEntry bookEntry) {
        return bookMapper.getRecordCount(bookEntry);
    }

    @Override
    public List<BookEntry> getBookListByPage(BookEntry bookEntry) {
        return bookMapper.getBookListByPage(bookEntry);
    }


}
